package org.adorsys.aderp.aderplogin.roles;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.FilterInvocation;

public class ContextualWebSecurityExpressionHandler extends
	ContextualSecurityExpressionHandler<FilterInvocation> {

	ContextualAttrEvalFactory contextualAttrEvalFactory;
	@Override
	protected ContextualSecurityExpressionRoot createSecurityExpressionRoot(
			Authentication authentication, FilterInvocation fi) {
        ContextualWebSecurityExpressionRoot root = 
        		new ContextualWebSecurityExpressionRoot(authentication, fi, contextualAttrEvalFactory);
        root.setPermissionEvaluator(getPermissionEvaluator());
        return root;
	}
	public void setContextualAttrEvalFactory(
			ContextualAttrEvalFactory contextualAttrEvalFactory) {
		this.contextualAttrEvalFactory = contextualAttrEvalFactory;
	}
}
